Conventionally, there has been known a phenomenon that gradation in a dark part of image data is flattened darkly when an object having a large brightness difference is photographed. Accordingly, the invention of Patent Document 1 compresses a gradation by increasing a gain in the dark part gradation to improve the dark flattening of the dark part gradation.    Patent Document 1: Japanese Patent No. 2663189